package com.mo.enums;

import lombok.Getter;

@Getter
public enum ResultCode {
    SUCCESS(200, "success"),
    ERROR(500, "error"),
    USER_EXIST(400, "用户已存在"),
    USER_NOT_EXIST(400, "用户不存在"),
    USER_PASSWORD_ERROR(400, "账号或密码错误"),
    LOGIN_SUCCESS(200, "登录成功！"),
    Unauthorized(401, "登录过期，请重新登录"),
    TOKEN_NOT_EXIST(401, "token不存在，请重试"),
    PAGE_NOT_FOUND(404, "访问的资源不存在"),
    MENU_NOT_EMPTY(4008, "当前菜单含有子级，不能删除"),
    MENU_NOT_ALLOW_MOVE2_CHILDREN(4009, "不能将父级菜单移动到子级"),
    ;

    private final Integer code;
    private final String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
